package com.easy.service.impl;

import com.easy.bean.Order;
import com.easy.bean.PrivateClass;
import com.easy.dao.IPrivateDao;
import com.easy.service.IPrivateService;
import com.easy.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class PrivateServiceImpl implements IPrivateService {

    @Autowired
    IPrivateDao dao;

    @Override
    public List<PrivateClass> getPrivateClass(PrivateClass privateClass, Page page) {
        return dao.getPrivateClass(privateClass,page);
    }

    @Override
    public int getPrivateClassCount(PrivateClass privateClass) {
        return dao.getPrivateClassCount(privateClass);
    }

    @Override
    public int delPrivateClass(PrivateClass privateClass) {
        return dao.delPrivateClass(privateClass);
    }

    @Override
    public int editPrivateClass(PrivateClass privateClass) {
        return dao.editPrivateClass(privateClass);
    }

    @Override
    public PrivateClass getPrivateClassByID(PrivateClass privateClass) {
        return dao.getPrivateClassByID(privateClass);
    }

    @Override
    public int editPrivateClassTotal(Order order) {
        return dao.editPrivateClassTotal(order);
    }

    @Override
    public int addPrivateClass(Order order) {
        return dao.addPrivateClass(order);
    }

    @Override
    public int bookPublicClass(PrivateClass privateClass) {
        return dao.bookPublicClass(privateClass);
    }

    @Override
    public PrivateClass getPublicClassByID(PrivateClass privateClass) {
        return dao.getPublicClassByID(privateClass);
    }

    @Override
    public List<PrivateClass> getBookingByMemberID(int memberID) {
        return dao.getBookingByMemberID(memberID);
    }

    @Override
    public int delBooking(int id) {
        return dao.delBooking(id);
    }

    @Override
    public List<PrivateClass> getBookingByCourseID(int courseID) {
        return dao.getBookingByCourseID(courseID);
    }

    @Override
    public List<PrivateClass> getAllPrivate() {
        return dao.getAllPrivate();
    }

    @Override
    public List<PrivateClass> getPrivateClassByMemberID(int memberID) {
        return dao.getPrivateClassByMemberID(memberID);
    }

    @Override
    public List<PrivateClass> bookChart() {
        return dao.bookChart();
    }
}
